package com.test.singleton.test7;

/**
 * @Author: junwe
 * @Date: 2020/12/6 22:30
 */
public class SingletonTest6 {
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            new Thread(new GetInstanceThread()).start();
        }
    }
}

enum Singleton {
    INSTANCE;
}

class GetInstanceThread implements Runnable {

    @Override
    public void run() {
        System.out.println(Singleton.INSTANCE.hashCode());
    }
}